1. Field of the Invention
The present invention relates generally to the field of computer graphics systems, and more particularly to a system and method for converting a scene graph for optimizing rendering performance.
2. Related Art
"Scene graphs" are well-known data structures for representing multi-dimensional objects, particularly in object-oriented languages such as C++. A scene graph typically contains several nodes, with each node representing one of grouping, property, or shape information. A shape node may specify a shape, and a property node may specify properties such as color or texture of the shape. The nodes are connected by lines which define a sequence of traversal of the nodes. For further details on scene graphs and object oriented programming, the reader is referred to, "The Inventor Mentor", by Josie Wernecke, published by Addison-Wesley (ISBN 0-201-62495-8), and to, "Object-Oriented Software Engineering", by Jacobson et al., published by Addison-Wesley (ISBN 0-201-54435-0), which are both incorporated herein by reference.
An object represented by a scene graph is displayed generally by rendering the scene graph. Rendering usually entails traversing a scene graph to determine information corresponding to the shapes defined in the graph and the associated properties, and generating display signals in accordance with the information. Publicly available rendering libraries such as OpenGL may be used to generate such a display.
While rendering a scene graph, a graphics system may maintain a `state` while traversing the scene graph. Such a state may include information on properties which may be modified by nodes which are traversed as the scene graph is being traversed. When a shape is encountered in a traversal sequence in a scene graph, the information in the state at that traversal point may determine the properties of the shape. While rendering (either during traversal or while generating display signals) a scene graph, a state change may be undesirable because of, for example, the excessive amount of processing power or memory storage such a state change may require in a computer system.
Scene graphs may be generated by one of several programs available in the market. Such programs may not be designed to generate scene graphs for optimal rendering performance. For example, a scene graph may cause several state changes while rendering. A computer system may not have sufficient processing power and/or memory to render such scene graphs, and may accordingly be unable to generate image displays at a rate high enough for some applications, such as interactive applications.
What is therefore needed is an optimization program that optimizes scene graphs for an optimal rendering performance.